package cn.com.generaldata.os.util;

import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.springframework.core.io.ClassPathResource;


public class CacheManager {
	
	private static final CacheManager instance = new CacheManager();  

	//报表类型
	private Map reportTimetype = new HashMap();
	
	//BI配置
	private Map biConfig = new HashMap();
	
	private Properties properties = new Properties();
	
	private CacheManager(){
		java.io.InputStream inputstream = getClass().getResourceAsStream("/global_conf.properties");
		try {
			properties.load(inputstream);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		
		setReportTimetype();
	}
	
	// 静态方法返回该类的实例
    public static CacheManager getInstance() {  
        return instance;  
    }  
	
	public void init(){
		
		
		setReportTimetype();
	}
	
	public void setReportTimetype(){
		reportTimetype.put("0", "月报");
		reportTimetype.put("1", "年报");
		reportTimetype.put("2", "季报");
	}
	
	public Map<String, String> getReportTimetype(){
		return reportTimetype;
	}
	
	public String getGlobalConfig(String key){
		return properties.getProperty(key);
	}
}
